AUX_ENABLE_ALT = true
AUX_OPEN_FIRST = false
AUX_INSTANT_BUYOUT = false

AUX_AUCTION_DURATION = 'long'

local BoolToString, BoolToNum, NumToBool
-----------------------------------------

function Aux_ShowOptionsFrame()
	--再次点击按钮则关闭Aux设置界面
    if AuxOptionsFrame:IsShown() then
		AuxOptionsFrame:Hide()
    else
		AuxOptionsFrame:Show()
    end	

	AuxOptionsFrame:SetBackdropColor(0,0,0,100)
	
	AuxConfigFrameTitle:SetText("Aux设置"..UnitName("player"))

	AuxExplanation:SetText("Aux无UI版")


	AuxVersionText:SetText("版本: "..AuxVersion)
	
	AuxOption_Enable_Alt:SetChecked(AUX_ENABLE_ALT)
	AuxOption_Open_First:SetChecked(AUX_OPEN_FIRST)
	AuxOption_Instant_Buyout:SetChecked(AUX_INSTANT_BUYOUT)
end

-----------------------------------------

function AuxOptionsSave()

	AUX_ENABLE_ALT = AuxOption_Enable_Alt:GetChecked()
	AUX_OPEN_FIRST = AuxOption_Open_First:GetChecked()
	AUX_INSTANT_BUYOUT = AuxOption_Instant_Buyout:GetChecked()
	
end

-----------------------------------------

function Aux_ShowTooltip_EnableAlt()

	GameTooltip:SetOwner(this, "ANCHOR_BOTTOM")
	GameTooltip:AddLine("按住Alt键+左键 自动询价并放置物品", 0.5, 0.5, 1.0, 1)
	GameTooltip:Show()

end

-----------------------------------------

function Aux_ShowTooltip_OpenFirst()

	GameTooltip:SetOwner(this, "ANCHOR_BOTTOM")
	GameTooltip:AddLine("如果选中此选项, 每次打开拍卖行的时候自动跳转到Aux拍卖页面", 0.5, 0.5, 1.0, 1)
	GameTooltip:Show()

end

-----------------------------------------

function Aux_ShowTooltip_InstantBuyout()

	GameTooltip:SetOwner(this, "ANCHOR_BOTTOM")
	GameTooltip:AddLine("如果选中此选项, 将会立即购买右键选中的物品（慎用）", 1, 0, 0, 1)
	GameTooltip:Show()

end
